Skip to content

Security hardening: 7 fixes from security evaluation + integration tests#24

Merged
iamontheinet merged 1 commit into
mainfrom
security/hardening-and-integration-tests
Apr 30, 2026
Merged

Security hardening: 7 fixes from security evaluation + integration tests#24
iamontheinet merged 1 commit into
mainfrom
security/hardening-and-integration-tests

Conversation

@iamontheinet
Copy link
Copy Markdown
Member

Summary

  • execute_cortex.py: Orphan process prevention in except block (terminate/kill ladder)
  • discover_cortex.py: shell=True changed to shell=False to prevent command injection
  • predict_tools.py: Fixed cache path mismatch — now reads from CacheManager instead of stale /tmp path
  • session_state.py: Added chmod 0600 after atomic writes for consistent file permissions
  • read_cortex_sessions.py: 10MB file size guard before readlines() to prevent memory exhaustion
  • config.yaml.example: DEPLOY envelope commented out with blast-radius warning
  • SKILL.md: Updated stale --dangerously-allow-all-tool-calls reference to accurate --permission-prompt-tool stdio
  • test_integration.py: New end-to-end integration test (13 assertions, 4 test functions) that exercises credential blocking, RO query flow, envelope enforcement, and process cleanup against live Cortex CLI
  • run-tests.sh: Added --integration flag to gate integration tests (CI stays green without Snowflake creds)
  • README.md: Added Testing section documenting both test tiers

Test plan

  • Structural tests pass (23/23)
  • Unit tests pass (34 envelope_policy + 42 plugin_units)
  • Integration tests pass locally (13/13 against live Snowflake)
  • CI test.yml passes (structural only, no --integration)

@iamontheinet iamontheinet merged commit 8443c01 into main Apr 30, 2026
2 checks passed
@iamontheinet iamontheinet deleted the security/hardening-and-integration-tests branch May 10, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant